var form;
var table;
var $;
layui.use(['form','table'],function() {
    form = layui.form;
    table = layui.table;
    $ = layui.$;
    PendingProducts();
    CourseCheck();
    selSumTips();

})

//取消
$("#cancel").on('click',function(){
    var layer_1=parent.layer_1;
    layer_1.close(layer_1.index);

    //top.document.location.reload();
})

//确定
$('#confirm').on('click',function(){
    //获取当前登陆人员的信息
    var create=localStorage.getItem("user");
    create=JSON.parse(create);//将获取json字符串转json对象

    var prosa=$('input[name=productSate]:checked').val();
    var id=$('input[name=productId]').val(); //商品ID
    var orderId=$('input[name=orderId]').val(); //订单ID
    var orderType=$('input[name=orderType]').val(); //订单类型
    var result=prosa;
    if(result==8){
        result="同意退货";
    }else{
        result="拒绝退货";
    }
    var details=$('textarea[name=details]').val();
    if(details==''){
        details='无';
    }
    $.post("/SyOperationController/setOrderAudit",
        {"orderStatus":prosa,"orderId":orderId,"productId":id,"implementId":create.user_id,"result":result,"details":details,"type":orderType},
        function (data) {
        });

    //parent.shuaxin();
    var layer_1=parent.layer_1;
    layer_1.close(layer_1.index);
    top.document.location.reload();

})